package com.fauks.ssm.spring.tx_annotation;

import com.fauks.ssm.mybatis.bean.Person;
import com.fauks.ssm.mybatis.mapper.PersonMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class Tx2Service {

    @Autowired
    private PersonMapper personMapper;

    @Transactional
    public void updateById(Person person) {
        personMapper.update(person);

    }
}
